fix(github): bind /builder to the plan the approver selected - #259
fix(github): bind /builder to the plan the approver selected#259islahuddinn wants to merge 2 commits into
Conversation
7717db4 to
3dac681
Compare
|
I think there is still an atomicity window in Right now
The new ambiguous Could the new proposal creation + open event + superseding of older proposals be done in one DB transaction, with the new proposal inserted first and the older rows cancelled in that same transaction? A regression test that forces the create step to fail (and asserts the previous proposal stays open) would also pin this down. |
3dac681 to
f90f7ac
Compare
Supersede older open plan_acceptance proposals when a newer Architect run opens on the same issue, refuse bare /builder when multiple live plans exist, and accept `/builder <proposal-id>` for explicit Gate 1 binding. Fixes theam#233 Co-authored-by: Cursor <cursoragent@cursor.com>
Insert the new plan_acceptance row before cancelling siblings, all under one issue-scoped transaction lock. A failed create now leaves the previous live plan open, and concurrent Architect completions serialize instead of both remaining eligible for /builder. Co-authored-by: Cursor <cursoragent@cursor.com>
f90f7ac to
c7a7c4c
Compare
|
Thanks @ALVZ93 — you were right about the window.
The regression you asked for is in Rebased onto current |
Summary
plan_acceptanceproposals when a newer Architect run opens on the same issue, so only one live plan remains in the common case./builderwhen multiple live plans exist on an issue (builder_plan_ambiguous)./builder <proposal-id>(and/codex-builder <proposal-id>) to bind Gate 1 approval to the plan the human actually reviewed.Fixes #233
Test plan
vitest run test/plan-acceptance.test.ts test/builder-plan-policy.test.ts test/github.test.ts test/github-run-progress.test.tsvitest run test/builder-plan-policy.integration.test.ts(requires Postgres atDATABASE_URL)/architecttwice on one issue, verify bare/builderis blocked and/builder prop_…approves the intended planMade with Cursor